<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>登录</title>
		<link rel="stylesheet" href="css/MI_log in.css" />
	</head>
	<style type="text/css">
		p {
			display: none;
		}
	</style>

	<body>
		<div id="header">
			<img src="img/登录logo.png" />
		</div>
		<div id="content">
			<div id="main">
				
				<div id="head">
					<ul>
						<li>
							<a href="javascript:;">账号登录</a>
						</li>
						<li>|</li>
						<li>
							<a href="javascript:;">
								扫码登录
								<div class="headlist">
									<img src="img/小米二维码.png" />
								</div>
							</a>
						</li>
					</ul>
					
					<form  onsubmit="return yanzheng()" action="car.html">
						<div>
							<!--此处设置div是方便设置父节点的最后一个子节点隐藏-->
							<input type="text" id="text1" value=""  placeholder="邮箱/手机号码/小米账号"/>
							<p class="p1">请输入正确的账号！</p>
						</div>
						<div>
						<input type="password" id="password1" value="" name="password"  placeholder="请输入密码"/>
						
						<p class="p1">请输入正确的密码！</p>
						</div>
						<input type="submit" id="submit1" value="" />
					</form>
					
					<ul id="ul1">
						<li>
							<a href="register.html">
								注册小米账号</a>
						</li>
						<li>|</li>
						<li>
							<a href="javascript:;">
								忘记密码？</a>
						</li>

					</ul>

					<img src="img/分享.png" />
				</div>

			</div>
		</div>
		<div id="footer">
			<ul id="ul2">
				<li>
					简体
				</li>
				<li>
					|
				</li>
				<li>
					繁体
				</li>
				<li>
					|
				</li>
				<li>
					English
				</li>
				<li>
					|
				</li>
				<li>
					常见问题
				</li>

			</ul>
			<br />
			<p align="center">小米公司版权所有-京ICP备10046444-京公网安备11010802020134号-京ICP证110507号</p>
		</div>
		<script type="text/javascript">
			var isgo = true;
			function yanzheng() {
				var zhanghao = document.querySelector("#text1");
				var pw = document.querySelector("#password1");
				if(zhanghao.value == "") {
					zhanghao.parentNode.lastElementChild.style.display = "block";
					isgo = false;
				} else {
					zhanghao.parentNode.lastElementChild.style.display = "none";
				}
				if(pw.value == "") {
					pw.parentNode.lastElementChild.style.display = "block";
					isgo = false;
				} 
				else {
					pw.parentNode.lastElementChild.style.display = "none";
					
					checked();
			
			function checked(){
				var zhanghao = document.querySelector("#text1").value ;
				var pw = document.querySelector("#password1").value;	
				if (zhanghao=="18142232325"&& pw=="123") 
				{
				window.location="car.html";
				} }
					
				}
				return isgo;
			}
				
				
			
			
			
			
		</script>
	</body>
</html>